package com.hdoit.ares.web.cbase;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.hdoit.ares.web.wechat.handler.MsgHandler;
import com.hdoit.ares.web.wechat.handler.SubscribeHandler;
import com.hdoit.ares.web.wechat.handler.TemplateSendJobFinishHandler;
import com.hdoit.ares.web.wechat.handler.UnsubscribeHandler;
import com.tennetcn.web.cbase.wechat.BaseWeixinService;
import com.tennetcn.web.cbase.wechat.handler.BaseMsgHandler;
import com.tennetcn.web.cbase.wechat.handler.BaseSubscribeHandler;
import com.tennetcn.web.cbase.wechat.handler.BaseTemplateSendJobFinishHandler;
import com.tennetcn.web.cbase.wechat.handler.BaseUnsubscribeHandler;

@Component
public class WeixinService extends BaseWeixinService {
	private MsgHandler msgHandler;

	public MsgHandler getMsgHandler() {
		return msgHandler;
	}
	
	@Resource
	public void setMsgHandler(MsgHandler msgHandler) {
		this.msgHandler = msgHandler;
	}
	
	private SubscribeHandler subscribeHandler;
	
	public SubscribeHandler getSubscribeHandler() {
		return subscribeHandler;
	}
	
	@Resource
	public void setSubscribeHandler(SubscribeHandler subscribeHandler) {
		this.subscribeHandler = subscribeHandler;
	}
	
	private UnsubscribeHandler unsubscribeHandler;
	
	public UnsubscribeHandler getUnsubscribeHandler() {
		return unsubscribeHandler;
	}
	
	@Resource
	public void setUnsubscribeHandler(UnsubscribeHandler unsubscribeHandler) {
		this.unsubscribeHandler = unsubscribeHandler;
	}
	
	private TemplateSendJobFinishHandler templateSendJobFinishHandler;
	
	public TemplateSendJobFinishHandler getTemplateSendJobFinishHandler() {
		return templateSendJobFinishHandler;
	}
	
	@Resource
	public void setTemplateSendJobFinishHandler(TemplateSendJobFinishHandler templateSendJobFinishHandler) {
		this.templateSendJobFinishHandler = templateSendJobFinishHandler;
	}

	@Override
	protected BaseMsgHandler getBaseMsgHandler() {
		return getMsgHandler();
	}
	
	@Override
	protected BaseSubscribeHandler getBaseSubscribeHandler() {
		return getSubscribeHandler();
	}
	
	@Override
	protected BaseUnsubscribeHandler getBaseUnsubscribeHandler() {
		return getUnsubscribeHandler();
	}
	
	@Override
	protected BaseTemplateSendJobFinishHandler getBaseTemplateSendJobFinishHandler() {
		return getTemplateSendJobFinishHandler();
	}
}
